﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Mathematics
{
    public class Parameter:MathExpression
    {
        internal Parameter(ParameterDefinition definition,MathExpression value)
        {
            Definition = definition;
            Value = value;
        }

        public string Name { get { return Definition.Name; } }
        public MathExpression Value { get; private set; }
        public ParameterDefinition Definition { get; private set; }

        public override bool CanEvaluate()
        {
            return Value.CanEvaluate();
        }

        public override double? Evaluate()
        {
            return Value.Evaluate();
        }

        //public override IEnumerable<Variable> GetVariables()
        //{
        //    return new Variable[0];
        //}

        //public override IEnumerable<Constant> GetConstants()
        //{
        //    return new Constant[0];
        //}

        protected internal override MathExpression Reduce(out bool didReduce)
        {
            throw new NotImplementedException();
        }
    }
}
